package nccloud.web.hrjx.pubinfo.datacoll.ref;

import nccloud.framework.web.processor.refgrid.RefQueryInfo;
import nccloud.framework.web.ui.meta.RefMeta;
import nccloud.web.refer.DefaultGridRefAction;

public class JxPeriodRef extends DefaultGridRefAction{
	
	@Override
	public RefMeta getRefMeta(RefQueryInfo refQueryInfo) {
		RefMeta retMeta = new RefMeta();
		
		retMeta.setCodeField("periodcode");
		retMeta.setNameField("periodname");
		retMeta.setPkField("id");
		retMeta.setTableName("pm_period");
		retMeta.setExtraFields(new String[] {"periodcode", "periodname"});
		retMeta.setMutilLangNameRef(false);
		setShowDisabledData(null);
		return retMeta;
	}

	@Override
	public String getOrderSql(RefQueryInfo para, RefMeta meta) {
		return " order by periodcode ";
	}
	
	@Override
	public String getExtraSql(RefQueryInfo para, RefMeta meta) {
		StringBuffer sql = new StringBuffer();
		sql.append(" dr = 0 ");
		return sql.toString();
	}
}
